package org.lys.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;


/**
 * 管理
 *
 * @author liyansheng
 * @version 1.0.0
 * @date 2022/11/20
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Validated
public class Admin {
    @TableId(type = IdType.AUTO)
    private Integer id;

    @Max(value = 100,message = "The maximum number of 100")
    @Min(value = 0,message = "The minimum number of 1")
    private int age;

    @NotBlank(message = "不能为空")
    private String name;
}
